]> permondes.de Git - Analog_Engine.git/blob - scripts/TP1 10.28 Masses hanging on springs.LACE
Throwing a stone on earth, starting a rocket from earth
[Analog_Engine.git] / scripts / TP1 10.28 Masses hanging on springs.LACE
1 # TP1 10.28 Masses hanging on springs
2 # Two identical masses m are hanging on 2 springs with same spring constant D. The system is performing small oscillations around the equilibrium position.
3 # m*s1'' + D*s1 + D*(s1-s2) = 0 => s1'' = D/m * (s2 - 2*s1) = D/m*s2 - D/m*s1 - D/m*s1
4 # m*s2'' + D*(s2-s1) = 0 => s2'' = D/m * (s1 - s2) = D/m*s1 - D/m*s2
5
6 coefficient(1): D/m_1 # D/m for s1
7 coefficient(2): D/m_2 # D/m for s2, identical to D/m_1
8 coefficient(3): -1 -> -s1_0 # initial position of s1
9 coefficient(4): -1 -> -s2_0 # initial position of s2
10
11 iintegrate D/m*s2, -D/m*s1, -D/m*s1 -> -s1' # input is s1''
12 iintegrate -s1' -> s1
13 IC: -s1_0
14 s1 * D/m_1 -> D/m*s1
15 invert D/m*s1 -> -D/m*s1
16
17 iintegrate D/m*s1, -D/m*s2 -> -s2' # input is s2''
18 iintegrate -s2' -> s2
19 IC: -s2_0
20 s2 * D/m_2 -> D/m*s2
21 invert D/m*s2 -> -D/m*s2
22
23 output(x): s1
24 output(y): s2